package com.lanyou.esb.cook.proxy.meta;

import java.rmi.NoSuchObjectException;

import org.apache.commons.lang3.StringUtils;

/**
 * 工单状态 <br>
 * 描述：<br>
 * 0：未处理；1：已处理
 * 
 * @author Davey.wu
 */
public enum WoStatus {
	NOT_DEAL("0"), DEAL("1");

	public final String ValueCode;

	private WoStatus(String code) {
		this.ValueCode = code;
	}

	public static WoStatus get(String valueCode) throws NoSuchObjectException {
		if (StringUtils.isBlank(valueCode)) {
			throw new NullPointerException();
		}
		for (WoStatus type : WoStatus.values()) {
			if (type.ValueCode.equals(valueCode)) {
				return type;
			}
		}
		throw new NoSuchObjectException(valueCode);
	}
}
